/*
 * @Description: 
 * @Author: zyj
 * @Date: 2022-05-31 17:24:49
 * @LastEditors: zyj
 * @LastEditTime: 2022-05-31 17:48:11
 */
let obj = {
  name: "张三",
  age: 23,
  children: {
    height: 100
  },
  first: {
    second: {
      third: 200
    }
  }
}
let p = new Proxy(obj, {
  get(target, key, receiver) {
    console.log("读取属性", key);
    return obj[key]
  },
  set(target, key, value) {
    console.log("设置属性", key);
    return true
  }
})

let b = p.first.second.third;
console.log(b);
